let mongoose = require("./db")

// 医说
let medical=new mongoose.Schema({
    title:String, //标题
    date:Date, //发布时间
    num:Number,  //浏览量
    content:String, //内容
    img:String, //图片
    text:String, //简介
    cid:{
        type:mongoose.Schema.Types.ObjectId,
        ref:"cate"
    } //分类
})

let medicalModel = mongoose.model("medical",medical,"medical")

//分类表
let cate=new mongoose.Schema({
    cname:String,
})

let cateModel = mongoose.model("cate",cate,"cate")

let typesSchema=new mongoose.Schema({
    title:String
})
let contentSchema=new mongoose.Schema({
    title:String,
    tid:String,
})
let DepartmentSchema=new mongoose.Schema({
    name:String, // 姓名
    physician:String, // 医师
    img:String,  // 图片
    hospital:String, // 医院
    department:String, // 科室
    speciality:String, // 特长
    status:Boolean, // 是否约满
    did:String, // 日期id
    content:String, // 简介
    yuyue_num:Number, // 预约人数
    zixun_num:Number, // 咨询人数
    guanzhu_num:String, // 关注人数
    date1:String, // 日期
    date1_s:String, // 日期上午
    date1_x:String, // 日期下午
    status_s1:Boolean, // 日期状态
    status_x1:Boolean,
    date2:String,
    date2_s:String, // 日期上午
    date2_x:String, // 日期下午
    status_s2:Boolean, // 日期状态
    status_x2:Boolean,
    date3:String,
    date3_s:String, // 日期上午
    date3_x:String, // 日期下午
    status_s3:Boolean, // 日期状态
    status_x3:Boolean,
    date4:String,
    date4_s:String, // 日期上午
    date4_x:String, // 日期下午
    status_s4:Boolean, // 日期状态
    status_x4:Boolean,
    menzhen:String, // 门诊
})

let dateSchema=mongoose.Schema({
    date:String,
    hao:String,
    status:Boolean
})
let types = mongoose.model("types",typesSchema,"types")
let content = mongoose.model("content",contentSchema,"content")
let department = mongoose.model("department",DepartmentSchema,"department")
let date = mongoose.model("date",dateSchema,"date")
//用户信息
let userlist=new mongoose.Schema({
    name:String,
    age:Number,
    sex:String,
    shen:String,
})

let userlistModel = mongoose.model("userlist",userlist,"userlist")


module.exports = {
    medicalModel,
    cateModel,
    types,
    content,
    department,
    date,
    userlistModel
}
let mongoose=require('./db')

let listSchema=mongoose.Schema({
    name:String,
})         


let List=mongoose.model('List',listSchema,'list')
module.exports={List}

